<?php if($this->pagination->total!=0&&$this->pagination->limit<$this->pagination->total): ?>
    <form name="pagination" method="post">
<div class="pagin-indent">
    <div class="pagin-top-border">       
        <?php if($this->pagination->pagecurrent==1): ?>
            <span class="pagenav">Start</span> &lt; <span class="pagenav">Prev</span>
        <?php else: ?>
		<a class="pagenav" href="javascript:submitpagination(0)" title="Next">Start</a>  &lt; 
		<a class="pagenav" href="javascript:submitpagination(<?php echo(($this->pagination->pagecurrent-2)*$this->pagination->limit) ?>)" title="End">Rrev</a>
        <?php endif ?>
        
        <?php for($i=1;$i<=$this->pagination->pagetotal;$i++): ?>
            <?php if($i==$this->pagination->pagecurrent): ?>
				<span class="pagenav"><?php echo $i ?></span>
                 <?php elseif(3>=$i||$i>=$this->pagination->pagetotal-3): ?>
				 <a class="pagenav" href="javascript:submitpagination(<?php echo(($i-1)*$this->pagination->limit) ?>)" title="<?php echo $i ?>"><?php echo $i ?></a>
            <?php elseif($this->pagination->pagecurrent-2<=$i&&$i<=$this->pagination->pagecurrent+2): ?>
                <a class="pagenav" href="javascript:submitpagination(<?php echo(($i-1)*$this->pagination->limit) ?>)" title="<?php echo $i ?>"><?php echo $i ?></a>
            <?php endif; ?>
        <?php endfor; ?>
        
        <?php if($this->pagination->pagecurrent==$this->pagination->pagetotal): ?>
            <span class="pagenav">Next</span> &gt; <span class="pagenav">End</span>
        <?php else: ?>
		<a class="pagenav" href="javascript:submitpagination(<?php echo(($this->pagination->pagecurrent)*$this->pagination->limit) ?>)" title="Next">Next</a> &gt; 
		<a class="pagenav" href="javascript:submitpagination(<?php echo(($this->pagination->pagetotal-1)*$this->pagination->limit) ?>)" title="End">End</a>
        <?php endif ?>
    </div>
</div>               
        <input type="hidden" name="limitstart" />
        <input type="hidden" name="firts" value="1" />
    </form>
    <script language="javascript">
       function submitpagination(limitstart)
    {
        document.pagination.limitstart.value=limitstart;
        document.pagination.submit();   
    }
    </script>
<?php endif; ?>
